#ifndef SAISIEABS_H
#define SAISIEABS_H


#include "ui_saisieabs.h"
#include <QDialog>
#include <QtGui>


#include <QSqlError>
#include <QSqlQuery>
#include <QSqlDatabase>

#include <QCompleter>

class DialogAbs : public QDialog, private Ui::SaisieAbs
{
    Q_OBJECT

public:
    DialogAbs(QWidget *parent );
    QList <QString> cin,dates,raisons,duree;

    void setMonth(const QDate & min, const QDate & max );
    //void setCin(QString curCin,QString name,double curSal);

    void saveChanges();
void createCompleters();





public slots:
    void addAbs();
    void remAbs();
    void print();
    //void showAbs(int year, int month);
    void setDate(QDate date);
    void setSel(QModelIndex ind);
void showAbs(int year, int month);

    void clearTable();


private:

    QStringList nomList,prenomList,cinList;

QCompleter *nomComp,*prenomComp;

QSqlQuery op;

int curRow;    bool changed;
    QString curcin;
    double curSal;
    QString curName;
    QDate curDate;
};

#endif // SAISIEABS_H
